import  random
a = random.randint(0,10)
b = int(input())
player = 5000
while a!=b:
    if player >= 0:
        b = int(input())
        if a < b:
            print("大了")
            player-=500
            continue
        elif a > b:
            print("小了")
            player-=500
            continue
        else:
            print("恭喜猜中，本轮幸运数字：%d" % b)
            player+=3000
            break
    else:
        print("本金余额不足，游戏结束")
        break